<template>
  <div class="warpper-box">
    <div class="inner_box">
      <template v-if="state">
        <sysHome></sysHome>
      </template>
      <template v-if="!state">
         <supplierHome></supplierHome>
      </template>
    </div>
  </div>
</template>

<script>
import { mapGetters, mapActions } from "vuex";
import sysHome from './sys_home.vue'
import supplierHome from './supplier_home.vue'
export default {
  components: {
    sysHome,
    supplierHome,
  },
  name:"Home",
  data() {
    return {
      state:true
    };
  },
  computed: {
    ...mapGetters(["permission_user"])
  },
  mounted() {
    this.init();
  },
  methods: {
    init() {
      this.state = this.permission_user.purchaseSupplier == null ? true : false
    }
  }
};
</script>
